import request from '@/utils/request'


const api_name = '/eduservice/edu-course'
export default {
  //添加信息课程信息
  addCourseInfo(courseInfo) {
    return request({
      url: `${api_name}/addCourseInfo`,
      method: 'post',
      data:courseInfo
    })
  },
  getListTeacher() {
    return request({
      url: '/edu-teacher/queryAll',
      method: 'get',
    })
  },
  getSubject() {
    return request({
      url: '/subject/getAllSubject',
      method: 'get',
    })
  },
  getCourseInfo(courseId) {
    return request({
      url: `/eduservice/edu-course/getCourseInfo/${courseId}`,
      method: 'get',
    })
  },
  updateCourseInfo(courseInfoVo) {
    return request({
      url: '/eduservice/edu-course/updateCourseInfo',
      method: 'post',
      data:courseInfoVo
    })
  },
  getPublishCourseInfo(id){
    return request({
      url: `/eduservice/edu-course/getPublishCourseInfo/${id}`,
      method: 'get',
    })
  },
  publishCourse(id){
    return request({
      url: `/eduservice/edu-course/publishCourse/${id}`,
      method: 'get',
    })
  },
  findAllCourse(page,limit,courseQuery){
    return request({
      url: `/eduservice/edu-course/findAllCourse/${page}/${limit}`,
      method: 'post',
      data:courseQuery
    })
  },
  removeById(id){
    return request({
      url: `/eduservice/edu-course/${id}`,
      method: 'delete',
    })
  },

}
